home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / ARMULATOR / ARMUL-PA / armul-patch
Text File  |  1997-07-28  |  22KB  |  677 lines

  1. Only in armul-arc/: HardImage1
  2. Only in armul-arc/: HardImage2
  3. diff --unified --recursive armul-arc/Makefile armul-fixed/Makefile
  4. --- armul-arc/Makefile    Mon Jul 28 16:42:51 1997
  5. +++ armul-fixed/Makefile    Mon Jul 28 16:23:39 1997
  6. @@ -30,7 +30,7 @@
  7.  
  8.  # Everything else should be ok as it is.
  9.  
  10. -OBJS = armcopro.o armemu26.o armemu32.o arminit.o \
  11. +OBJS = armcopro.o armemu26.o arminit.o \
  12.      armsupp.o main.o dagstandalone.o armos.o \
  13.          bag.o armrdi.o arch/DispKbd.o arch/i2c.o arch/archio.o \
  14.      arch/fdc1772.o arch/ControlPane.o arch/hdc63463.o arch/ReadConfig.o
  15. @@ -98,8 +98,8 @@
  16.  armemu26.o: armemu.c armdefs.h armemu.h 
  17.      $(CC) $(CFLAGS) -o armemu26.o -c armemu.c
  18.  
  19. -armemu32.o: armemu.c armdefs.h armemu.h
  20. -    $(CC) $(CFLAGS) -o armemu32.o -DMODE32 -c armemu.c
  21. +#armemu32.o: armemu.c armdefs.h armemu.h
  22. +#    $(CC) $(CFLAGS) -o armemu32.o -DMODE32 -c armemu.c
  23.  
  24.  arminit.o: arminit.c armdefs.h armemu.h
  25.      $(CC) $(CFLAGS) -c $*.c
  26. Only in armul-arc/: Makefile.orig
  27. Only in armul-arc/: ROM
  28. Only in armul-arc/arch: ControlPane.o
  29. Only in armul-arc/arch: DispKbd.o
  30. Only in armul-arc/arch: ReadConfig.o
  31. Only in armul-arc/arch: archio.o
  32. Only in armul-arc/arch: armarc.o
  33. Only in armul-arc/arch: fdc1772.o
  34. Only in armul-arc/arch: hdc63463.o
  35. Only in armul-arc/arch: i2c.o
  36. diff --unified --recursive armul-arc/armcopro.c armul-fixed/armcopro.c
  37. --- armul-arc/armcopro.c    Mon Jul 28 16:42:51 1997
  38. +++ armul-fixed/armcopro.c    Mon Jul 28 16:22:21 1997
  39. @@ -16,6 +16,7 @@
  40.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  41.  
  42.  #include "armdefs.h"
  43. +#include "armrdi.h"
  44.  
  45.  extern unsigned ARMul_CoProInit(ARMul_State *state) ;
  46.  extern void ARMul_CoProExit(ARMul_State *state) ;
  47. @@ -209,7 +210,7 @@
  48.   state->Exception++ ;
  49.   return(0) ;
  50.  }
  51. -
  52. +#if 0
  53.  static unsigned IntCDP(ARMul_State *state, unsigned type, ARMword instr)
  54.  {static unsigned long finish ;
  55.   ARMword howlong ;
  56. @@ -251,7 +252,7 @@
  57.      }
  58.   return(ARMul_CANT) ;
  59.   }
  60. -
  61. +#endif
  62.  /***************************************************************************\
  63.  *         Install co-processor instruction handlers in this routine         *
  64.  \***************************************************************************/
  65. Only in armul-arc/: armcopro.c.orig
  66. Only in armul-arc/: armcopro.o
  67. Only in armul-arc/: armdefs.h.orig
  68. diff --unified --recursive armul-arc/armemu.c armul-fixed/armemu.c
  69. --- armul-arc/armemu.c    Mon Jul 28 16:42:51 1997
  70. +++ armul-fixed/armemu.c    Mon Jul 28 15:34:26 1997
  71. @@ -19,6 +19,7 @@
  72.      (gilbertd@cs.man.ac.uk) */
  73.  #include "armdefs.h"
  74.  #include "armemu.h"
  75. +#include "armsupp.h"
  76.  
  77.  static ARMword GetDPRegRHS(ARMul_State *state, ARMword instr) ;
  78.  static ARMword GetDPSRegRHS(ARMul_State *state, ARMword instr) ;
  79. @@ -1807,7 +1808,7 @@
  80.  #ifdef MODE32
  81.               state->Reg[14] = pc + 4 ; /* put PC into Link */
  82.  #else
  83. -             state->Reg[14] = pc + 4 | ECC | ER15INT | EMODE ; /* put PC into Link */
  84. +             state->Reg[14] = (pc + 4) | ECC | ER15INT | EMODE ; /* put PC into Link */
  85.  #endif
  86.               state->Reg[15] = pc + 8 + POSBRANCH ;
  87.               FLUSHPIPE ;
  88. Only in armul-arc/: armemu.c.orig
  89. diff --unified --recursive armul-arc/armemu.h armul-fixed/armemu.h
  90. --- armul-arc/armemu.h    Mon Jul 28 16:42:51 1997
  91. +++ armul-fixed/armemu.h    Mon Jul 28 15:35:35 1997
  92. @@ -139,7 +139,7 @@
  93.                          ASSIGNV((state->Reg[15] & VBIT) != 0) ; \
  94.                          } \
  95.                       else { \
  96. -                        state->Reg[15] = R15PC | (s) & (CCBITS | R15INTBITS | R15MODEBITS) ; \
  97. +                        state->Reg[15] = R15PC | ((s) & (CCBITS | R15INTBITS | R15MODEBITS)) ; \
  98.                          ARMul_R15Altered(state) ; \
  99.                          }
  100.  #define SETABORT(i,m) state->Cpsr = ECC | EINT | (i) | (m)
  101. Only in armul-arc/: armemu.h.orig
  102. Only in armul-arc/: armemu26.o
  103. Only in armul-arc/: armemu32.o
  104. diff --unified --recursive armul-arc/arminit.c armul-fixed/arminit.c
  105. --- armul-arc/arminit.c    Mon Jul 28 16:42:51 1997
  106. +++ armul-fixed/arminit.c    Mon Jul 28 16:27:48 1997
  107. @@ -188,9 +188,11 @@
  108.   state->Emulate = RUN ;
  109.   while (state->Emulate != STOP) {
  110.      state->Emulate = RUN ;
  111. +#if 0
  112.      if (state->prog32Sig && ARMul_MODE32BIT)
  113.         pc = ARMul_Emulate32(state) ;
  114.      else
  115. +#endif
  116.         pc = ARMul_Emulate26(state) ;
  117.      }
  118.   return(pc) ;
  119. @@ -206,9 +208,11 @@
  120.  {ARMword pc = 0 ;
  121.  
  122.   state->Emulate = ONCE ;
  123. +#if 0
  124.   if (state->prog32Sig && ARMul_MODE32BIT)
  125.      pc = ARMul_Emulate32(state) ;
  126.   else
  127. +#endif
  128.      pc = ARMul_Emulate26(state) ;
  129.  
  130.   return(pc) ;
  131. @@ -250,7 +254,7 @@
  132.         SETABORT(IBIT,state->prog32Sig?UNDEF32MODE:SVC26MODE) ;
  133.         ARMul_CPSRAltered(state) ;
  134.         state->Reg[14] = temp - 4 ;
  135. -       fprintf(stderr,"DAG: In ARMul_Abort: Taking undefined instruction trap R[14] being set to: 0x%08x\n",
  136. +       fprintf(stderr,"DAG: In ARMul_Abort: Taking undefined instruction trap R[14] being set to: 0x%08lu\n",
  137.                 state->Reg[14]);
  138.         break ;
  139.      case ARMul_SWIV : /* Software Interrupt */
  140. Only in armul-arc/: arminit.c.orig
  141. Only in armul-fixed/: arminit.h
  142. Only in armul-arc/: arminit.o
  143. diff --unified --recursive armul-arc/armos.c armul-fixed/armos.c
  144. --- armul-arc/armos.c    Fri Dec  9 13:40:53 1994
  145. +++ armul-fixed/armos.c    Mon Jul 28 17:43:41 1997
  146. @@ -25,6 +25,7 @@
  147.  #include <time.h>
  148.  #include <errno.h>
  149.  #include <string.h>
  150. +#include <unistd.h>
  151.  
  152.  #ifdef __STDC__
  153.  #define unlink(s) remove(s)
  154. @@ -53,6 +54,8 @@
  155.  
  156.  #include "armdefs.h"
  157.  #include "armos.h"
  158. +#include "armrdi.h"
  159. +#include "armsupp.h"
  160.  #ifndef NOOS
  161.  #ifndef VALIDATE
  162.  /* #ifndef ASIM */
  163. @@ -103,6 +106,7 @@
  164.  #define FIXCRLF(t,c) c 
  165.  #endif
  166.  
  167. +#if 0
  168.  static ARMword softvectorcode[] =
  169.  {   /* basic: swi tidyexception + event; mov pc, lr;
  170.                ldmia r11,{r11,pc}; swi generateexception + event
  171. @@ -118,6 +122,7 @@
  172.    0xef000098, 0xe1a0e00f, 0xe89b8800, 0xef000088, /*Error*/
  173.    0xe1a0f00e /* default handler */
  174.  };
  175. +#endif
  176.  
  177.  /***************************************************************************\
  178.  *            Time for the Operating System to initialise itself.            *
  179. @@ -178,7 +183,7 @@
  180.   ARMul_WriteWord(state,4,FPENEWVECT(ARMul_ReadWord(state,i-4))) ; /* install new vector */
  181.   ARMul_ConsolePrint (state, ", FPE") ;
  182.  
  183. -/* #endif /* ASIM */
  184. +/* #endif  ASIM */
  185.  #endif /* VALIDATE */
  186.  #endif /* NOOS */
  187.  
  188. Only in armul-arc/: armos.o
  189. diff --unified --recursive armul-arc/armrdi.c armul-fixed/armrdi.c
  190. --- armul-arc/armrdi.c    Mon Jul 28 16:42:51 1997
  191. +++ armul-fixed/armrdi.c    Mon Jul 28 19:17:40 1997
  192. @@ -20,6 +20,7 @@
  193.  #include "armdefs.h"
  194.  #include "armemu.h"
  195.  #include "armos.h"
  196. +#include "arminit.h"
  197.  #include "dbg_cp.h"
  198.  #include "dbg_conf.h"
  199.  #include "dbg_rdi.h"
  200. @@ -32,9 +33,11 @@
  201.  #define Watch_AnyRead (RDIWatch_ByteRead+RDIWatch_HalfRead+RDIWatch_WordRead)
  202.  #define Watch_AnyWrite (RDIWatch_ByteWrite+RDIWatch_HalfWrite+RDIWatch_WordWrite)
  203.  
  204. +#if 0
  205.  static unsigned FPRegsAddr ; /* last known address of FPE regs */
  206.  #define FPESTART 0x2000L
  207.  #define FPEEND   0x8000L
  208. +#endif
  209.  
  210.  #define IGNORE(d) (d = d)
  211.  #ifdef RDI_VERBOSE
  212. @@ -95,10 +98,7 @@
  213.  void ARMul_ConsolePrint(ARMul_State *state, const char *format, ...)
  214.  {
  215.    va_list ap;
  216. -  int ch;
  217. -  char *str, buf[CONSOLE_PRINT_MAX_LEN];
  218. -  int i, j;
  219. -  ARMword junk;
  220. +  char ch, *str, buf[CONSOLE_PRINT_MAX_LEN];
  221.  
  222.    va_start(ap, format);
  223.    vsprintf(buf, format, ap);
  224. @@ -177,11 +177,11 @@
  225.  };
  226.  
  227.  static int RDI_open(unsigned type, const Dbg_ConfigBlock *config,
  228. -                    const Dbg_HostosInterface *hostif,
  229. -                    struct Dbg_MCState *dbg_state)
  230. +                    const Dbg_HostosInterface *hostif /*,
  231. +                    struct Dbg_MCState *dbg_state*/)
  232.  /* Initialise everything */
  233.  {int virgin = (state == NULL);
  234. - IGNORE(dbg_state);
  235. +/* IGNORE(dbg_state); */
  236.  
  237.  #ifdef RDI_VERBOSE
  238.   if (rdi_log & 1) {
  239. @@ -378,10 +378,8 @@
  240.  \***************************************************************************/
  241.  
  242.  static int RDI_CPread(unsigned CPnum, unsigned long mask, ARMword buffer[])
  243. -{ARMword fpregsaddr, word[4] ;
  244. - unsigned r, w ;
  245. - unsigned upto ;
  246. +{
  247. + unsigned r, upto ;
  248.  
  249.   if (CPnum != 1 && CPnum != 2) {
  250.      unsigned char const *rmap = state->CPRegWords[CPnum];
  251. @@ -498,9 +496,9 @@
  252.  \***************************************************************************/
  253.  
  254.  static int RDI_CPwrite(unsigned CPnum, unsigned long mask, ARMword const buffer[])
  255. -{unsigned r ;
  256. +{
  257. + unsigned r ;
  258.   unsigned upto ;
  259. - ARMword fpregsaddr;
  260.  
  261.   if (CPnum != 1 && CPnum != 2) {
  262.      unsigned char const *rmap = state->CPRegWords[CPnum];
  263. @@ -524,7 +522,7 @@
  264.  #endif
  265.      for (upto = 0, r = 0; r < rmap[-1]; r++)
  266.         if (mask & (1L << r)) {
  267. -          (void)state->CPWrite[CPnum](state, r, &buffer[upto]);
  268. +          (void)state->CPWrite[CPnum](state, r, buffer[upto]);
  269.            upto += rmap[r];
  270.         }
  271.      return RDIError_NoError;
  272. Only in armul-arc/: armrdi.c.orig
  273. Only in armul-fixed/: armrdi.h
  274. Only in armul-arc/: armrdi.o
  275. Only in armul-arc/: armsupp.c.orig
  276. Only in armul-fixed/: armsupp.h
  277. Only in armul-arc/: armsupp.o
  278. Only in armul-arc/: armul-arc
  279. diff --unified --recursive armul-arc/armvirt.c armul-fixed/armvirt.c
  280. --- armul-arc/armvirt.c    Fri Dec  9 14:50:41 1994
  281. +++ armul-fixed/armvirt.c    Mon Jul 28 15:40:14 1997
  282. @@ -23,8 +23,9 @@
  283.  freed as they might be needed again. A single area of memory may be
  284.  defined to generate aborts. */
  285.  
  286. -#include "armopts.h"
  287. +/* #include "armopts.h" */
  288.  #include "armdefs.h"
  289. +#include "armrdi.h"
  290.  
  291.  #ifdef VALIDATE /* for running the validate suite */
  292.  #define TUBE 48 * 1024 * 1024 /* write a char on the screen */
  293. diff --unified --recursive armul-arc/bag.c armul-fixed/bag.c
  294. --- armul-arc/bag.c    Fri Dec  9 13:46:12 1994
  295. +++ armul-fixed/bag.c    Mon Jul 28 15:41:15 1997
  296. @@ -24,6 +24,8 @@
  297.  /* is deleted.                                                      */
  298.  /********************************************************************/
  299.  
  300. +#include <stdlib.h>
  301. +
  302.  #include "bag.h"
  303.  
  304.  #define HASH_TABLE_SIZE 256
  305. diff --unified --recursive armul-arc/bag.h armul-fixed/bag.h
  306. --- armul-arc/bag.h    Fri Dec  9 13:59:15 1994
  307. +++ armul-fixed/bag.h    Mon Jul 28 15:41:31 1997
  308. @@ -28,7 +28,7 @@
  309.  typedef enum {
  310.    NO_ERROR,
  311.    DELETED_OLD_PAIR,
  312. -  NO_SUCH_PAIR,
  313. +  NO_SUCH_PAIR
  314.  } Bag_error;
  315.  
  316.  void BAG_putpair(long first, long second);
  317. Only in armul-arc/: bag.o
  318. diff --unified --recursive armul-arc/communicate.c armul-fixed/communicate.c
  319. --- armul-arc/communicate.c    Fri Dec  9 13:46:54 1994
  320. +++ armul-fixed/communicate.c    Mon Jul 28 15:46:41 1997
  321. @@ -25,6 +25,7 @@
  322.  #include <sys/types.h>
  323.  #include <sys/socket.h>
  324.  #include <netinet/in.h>
  325. +#include <unistd.h>
  326.  
  327.  #include "armdefs.h"
  328.  
  329. @@ -79,7 +80,7 @@
  330.       this is probably preferable to locking up.  */
  331.        return -1;
  332.        fprintf(stderr, "Waiting for connection from debugger...");
  333. -      debugsock = accept(sockethandle, &isa, &i);
  334. +      debugsock = accept(sockethandle, (struct sockaddr *)&isa, &i);
  335.        if (debugsock < 0) { /* Now we are in serious trouble... */
  336.      perror("accept");
  337.      return -1;
  338. @@ -129,7 +130,7 @@
  339.        fprintf(stderr, "Connection with debugger severed.\n");
  340.        return -1;
  341.        fprintf(stderr, "Waiting for connection from debugger...");
  342. -      debugsock = accept(sockethandle, &isa, &i);
  343. +      debugsock = accept(sockethandle, (struct sockaddr *)&isa, &i);
  344.        if (debugsock < 0) { /* Now we are in serious trouble... */
  345.      perror("accept");
  346.      return -1;
  347. @@ -176,19 +177,19 @@
  348.    MYwrite_char(sock, (i & 0xff000000) >> 24);
  349.  }
  350.  
  351. -void MYwrite_string(int sock, char *s) {
  352. +void MYwrite_string(int sock, unsigned char *s) {
  353.    int i;  
  354.    for (i = 0; MYwrite_char(sock, s[i]), s[i]; i++);
  355.  }
  356.  
  357. -int MYread_FPword(int sock, char *putinhere) {
  358. +int MYread_FPword(int sock, unsigned char *putinhere) {
  359.    int i;
  360.    for (i = 0; i < 16; i++)
  361.      if (MYread_char(sock, &putinhere[i]) < 0) return -1;
  362.    return 0;
  363.  }
  364.  
  365. -void MYwrite_FPword(int sock, char *fromhere) {
  366. +void MYwrite_FPword(int sock, unsigned char *fromhere) {
  367.    int i;
  368.    for (i = 0; i < 16; i++)
  369.      MYwrite_char(sock, fromhere[i]);
  370. @@ -197,10 +198,10 @@
  371.  /* Takes n bytes from source and those n bytes */
  372.  /* down to dest */
  373.  int passon(int source, int dest, int n) {
  374. -  char *p;
  375. +  unsigned char *p;
  376.    int i;
  377.    
  378. -  p = (char *) malloc(n);
  379. +  p = (unsigned char *) malloc(n);
  380.    if (!p) {
  381.      perror("Out of memory\n");
  382.      exit(1);
  383. diff --unified --recursive armul-arc/communicate.h armul-fixed/communicate.h
  384. --- armul-arc/communicate.h    Fri Dec  9 13:59:55 1994
  385. +++ armul-fixed/communicate.h    Mon Jul 28 15:47:08 1997
  386. @@ -19,9 +19,9 @@
  387.  void MYwrite_char(int sock, unsigned char c);
  388.  int MYread_word(int sock, ARMword *here);
  389.  void MYwrite_word(int sock, ARMword i);
  390. -void MYwrite_string(int sock, char *s);
  391. -int MYread_FPword(int sock, char *putinhere);
  392. -void MYwrite_FPword(int sock, char *fromhere);
  393. +void MYwrite_string(int sock, unsigned char *s);
  394. +int MYread_FPword(int sock, unsigned char *putinhere);
  395. +void MYwrite_FPword(int sock, unsigned char *fromhere);
  396.  int passon(int source, int dest, int n);
  397.  
  398.  int wait_for_osreply(ARMword *reply);  /* from kid.c */
  399. diff --unified --recursive armul-arc/dagstandalone.c armul-fixed/dagstandalone.c
  400. --- armul-arc/dagstandalone.c    Sun Jul 27 14:28:36 1997
  401. +++ armul-fixed/dagstandalone.c    Mon Jul 28 17:41:57 1997
  402. @@ -28,6 +28,7 @@
  403.  #endif
  404.  
  405.  #include "armdefs.h"
  406. +#include "bag.h"
  407.  #include "dbg_conf.h"
  408.  #include "dbg_hif.h"
  409.  #include "dbg_rdi.h"
  410. @@ -49,8 +50,6 @@
  411.  /* RDI interface */
  412.  extern const struct RDIProcVec armul_rdi;
  413.  
  414. -static int MYrdp_level = 0;
  415. -
  416.  static int rdi_state = 0;
  417.  
  418.  /**************************************************************/
  419. @@ -94,22 +93,18 @@
  420.  };
  421.  
  422.  void dagstandalone() {
  423. -  char *p, *q;
  424. -  int i, j, k;
  425. -  unsigned char c, d, message;
  426. -  ARMword x, y, z;
  427. +  int i;
  428.    struct sigaction action;
  429.    PointHandle point;
  430.    Dbg_ConfigBlock config;
  431.    Dbg_HostosInterface hostif;
  432. -  struct Dbg_MCState *MCState;
  433. -  char command_line[256];
  434. +/*  struct Dbg_MCState *MCState;*/
  435.    
  436.    ARMword RegVals[]={0}; /* PC - reset*/
  437.    
  438.    /* Setup a signal handler for SIGUSR1 */
  439.    action.sa_handler = dagstandalone_handlesignal;
  440. -  action.sa_mask = 0;
  441. +  sigemptyset (&action.sa_mask);
  442.    action.sa_flags = 0;
  443.    
  444.    sigaction(SIGUSR1, &action, (struct sigaction *) 0);
  445. @@ -136,7 +131,7 @@
  446.      /* we have restarted, so kill off the existing run.  */
  447.      /* armul_rdi.close(); */
  448.    }
  449. -  i = armul_rdi.open(0, &config, &hostif, MCState);
  450. +  i = armul_rdi.open(0, &config, &hostif/*, MCState*/);
  451.    rdi_state = 1;
  452.  
  453.    armul_rdi.CPUwrite(3 /* That should just about be svc 26 */,RDIReg_PC,
  454. Only in armul-arc/: dagstandalone.o
  455. diff --unified --recursive armul-arc/dbg_rdi.h armul-fixed/dbg_rdi.h
  456. --- armul-arc/dbg_rdi.h    Fri Dec  9 14:03:38 1994
  457. +++ armul-fixed/dbg_rdi.h    Mon Jul 28 17:41:26 1997
  458. @@ -229,8 +229,8 @@
  459.  struct Dbg_HostosInterface;
  460.  struct Dbg_MCState;
  461.  typedef int rdi_open_proc(unsigned type, struct Dbg_ConfigBlock const *config,
  462. -                          struct Dbg_HostosInterface const *i,
  463. -                          struct Dbg_MCState *dbg_state);
  464. +                          struct Dbg_HostosInterface const *i/*,
  465. +                          struct Dbg_MCState *dbg_state*/);
  466.  typedef int rdi_close_proc(void);
  467.  typedef int rdi_read_proc(ARMword source, void *dest, unsigned *nbytes);
  468.  typedef int rdi_write_proc(const void *source, ARMword dest, unsigned *nbytes);
  469. Only in armul-arc/: hexcmos
  470. diff --unified --recursive armul-arc/kid.c armul-fixed/kid.c
  471. --- armul-arc/kid.c    Fri Dec  9 13:50:19 1994
  472. +++ armul-fixed/kid.c    Mon Jul 28 15:56:57 1997
  473. @@ -24,6 +24,8 @@
  474.  
  475.  #include <sys/types.h>
  476.  #include <signal.h>
  477. +#include <unistd.h>
  478. +#include <sys/time.h>
  479.  
  480.  #include "armdefs.h"
  481.  #include "dbg_conf.h"
  482. @@ -31,6 +33,7 @@
  483.  #include "dbg_rdi.h"
  484.  #include "gdbhost.h"
  485.  #include "communicate.h"
  486. +#include "bag.h"
  487.  
  488.  /* The pipes between the two processes */
  489.  extern int mumkid[2];
  490. @@ -61,7 +64,7 @@
  491.    fprintf(stderr, "Terminate ARMulator excecution\n");
  492.  #endif
  493.    if (sig != SIGUSR1) {
  494. -    fprintf("Unsupported signal.\n");
  495. +    fprintf(stderr, "Unsupported signal.\n");
  496.      return;
  497.    }
  498.    armul_rdi.info(RDISignal_Stop, (unsigned long *) 0, (unsigned long *) 0);
  499. @@ -72,7 +75,7 @@
  500.  /* acts as an RDP to RDI interpreter on the front of the ARMulator. */
  501.  /********************************************************************/
  502.  void kid() {
  503. -  char *p, *q;
  504. +  unsigned char *p, *q;
  505.    int i, j, k;
  506.    long outofthebag;
  507.    unsigned char c, d, message;
  508. @@ -82,7 +85,7 @@
  509.    Dbg_ConfigBlock config;
  510.    Dbg_HostosInterface hostif;
  511.    struct Dbg_MCState *MCState;
  512. -  char command_line[256];
  513. +  unsigned char command_line[256];
  514.    struct fd_set readfds;
  515.    
  516.    /* Setup a signal handler for SIGUSR1 */
  517. @@ -162,7 +165,7 @@
  518.        /* Read Memory Address */      
  519.        MYread_word(mumkid[0], &x); /* address */
  520.        MYread_word(mumkid[0], &y); /* nbytes */
  521. -      p = (char *) malloc(y);
  522. +      p = malloc(y);
  523.        i = armul_rdi.read(x, p, (unsigned *) &y);
  524.        MYwrite_char(kidmum[1], RDP_Return);
  525.        for (k = 0; k < y; k++)
  526. @@ -177,7 +180,7 @@
  527.        /* Write Memory Address */
  528.        MYread_word(mumkid[0], &x); /* address */
  529.        MYread_word(mumkid[0], &y); /* nbytes */
  530. -      p = (char *) malloc(y);
  531. +      p = malloc(y);
  532.        for (k = 0; k < y; k++)
  533.      MYread_char(mumkid[0], &p[k]);
  534.        i = armul_rdi.write(p, x, (unsigned *) &y);
  535. @@ -192,7 +195,7 @@
  536.        /* Read CPU State */
  537.        MYread_char(mumkid[0], &c); /* mode */
  538.        MYread_word(mumkid[0], &x); /* mask */
  539. -      p = (char *) malloc(4 * RDINumCPURegs);
  540. +      p = malloc(4 * RDINumCPURegs);
  541.        i = armul_rdi.CPUread(c, x, (ARMword *) p);
  542.        MYwrite_char(kidmum[1], RDP_Return);
  543.        for (k = 1, j = 0; k != 0x80000000; k *= 2)
  544. @@ -207,7 +210,7 @@
  545.        MYread_char(mumkid[0], &c); /* mode */
  546.        MYread_word(mumkid[0], &x); /* mask */
  547.  
  548. -      p = (char *) malloc(4 * RDINumCPURegs);
  549. +      p = malloc(4 * RDINumCPURegs);
  550.        for (k = 1, j = 0; k != 0x80000000; k *= 2)
  551.      if (k & x) MYread_word(mumkid[0], &(((ARMword *) p)[j++]));
  552.        i = armul_rdi.CPUwrite(c, x, (ARMword *) p);
  553. @@ -220,7 +223,7 @@
  554.        /* Read Co-Processor State */
  555.        MYread_char(mumkid[0], &c); /* CPnum */
  556.        MYread_word(mumkid[0], &x); /* mask */
  557. -      p = q = (char *) malloc(16 * RDINumCPRegs);
  558. +      p = q = malloc(16 * RDINumCPRegs);
  559.        i = armul_rdi.CPread(c, x, (ARMword *) p);
  560.        MYwrite_char(kidmum[1], RDP_Return);
  561.        for (k = 1, j = 0; k != 0x80000000; k *= 2, j++)
  562. @@ -243,7 +246,7 @@
  563.        /* Write Co-Processor State */
  564.        MYread_char(mumkid[0], &c); /* CPnum */
  565.        MYread_word(mumkid[0], &x); /* mask */
  566. -      p = q = (char *) malloc(16 * RDINumCPURegs);
  567. +      p = q = malloc(16 * RDINumCPURegs);
  568.        for (k = 1, j = 0; k != 0x80000000; k *= 2, j++)
  569.      if (k & x) {
  570.        if ((c == 1 || c == 2) && k <= 128) {
  571. @@ -387,7 +390,7 @@
  572.        break;
  573.  
  574.      default:
  575. -      fprintf (stderr, "Unsupported info code %d\n", x);
  576. +      fprintf (stderr, "Unsupported info code %lu\n", x);
  577.        break;
  578.      }
  579.        break;
  580. @@ -401,7 +404,7 @@
  581.        /* Reset */
  582.        for (i = 0; i < 50; i++)
  583.      MYwrite_char(kidmum[1], RDP_Reset);
  584. -      p = (char *) malloc(MAXHOSTNAMELENGTH + 5 + 20);
  585. +      p = malloc(MAXHOSTNAMELENGTH + 5 + 20);
  586.        sprintf(p, "Running on %s:%d\n", localhost, socketnumber);
  587.        MYwrite_string(kidmum[1], p);
  588.        free(p);
  589. @@ -421,16 +424,11 @@
  590.  /* in 'putinr0' with the data if appropriate. */
  591.  int wait_for_osreply(ARMword *reply)
  592.  {
  593. -  char *p, *q;
  594. -  int i, j, k;
  595. -  unsigned char c, d, message;
  596. -  ARMword x, y, z;
  597. +  unsigned char *p;
  598. +  int i, k;
  599. +  unsigned char c, message;
  600. +  ARMword x, y;
  601.    struct sigaction action;
  602. -  PointHandle point;
  603. -  Dbg_ConfigBlock config;
  604. -  Dbg_HostosInterface hostif;
  605. -  struct Dbg_MCState *MCState;
  606. -  char command_line[256];
  607.    struct fd_set readfds;
  608.    
  609.  #ifdef DEBUG
  610. @@ -468,7 +466,7 @@
  611.        /* Read Memory Address */
  612.        MYread_word(mumkid[0], &x); /* address */
  613.        MYread_word(mumkid[0], &y); /* nbytes */
  614. -      p = (char *) malloc(y);
  615. +      p = malloc(y);
  616.        i = armul_rdi.read(x, p, (unsigned *) &y);
  617.        MYwrite_char(kidmum[1], RDP_Return);
  618.        for (k = 0; k < y; k++)
  619. @@ -483,7 +481,7 @@
  620.        /* Write Memory Address */
  621.        MYread_word(mumkid[0], &x); /* address */
  622.        MYread_word(mumkid[0], &y); /* nbytes */
  623. -      p = (char *) malloc(y);
  624. +      p = malloc(y);
  625.        for (k = 0; k < y; k++)
  626.      MYread_char(mumkid[0], &p[k]);
  627.        i = armul_rdi.write(p, x, (unsigned *) &y);
  628. @@ -497,7 +495,7 @@
  629.      case RDP_OSOpReply :
  630.        /* OS Operation Reply */
  631.        MYread_char(mumkid[0], &c);
  632. -      if (c == 1) MYread_char(mumkid[0], (char *) reply);
  633. +      if (c == 1) MYread_char(mumkid[0], (unsigned char *) reply);
  634.        if (c == 2) MYread_word(mumkid[0], reply);
  635.        return c;
  636.        break;
  637. diff --unified --recursive armul-arc/main.c armul-fixed/main.c
  638. --- armul-arc/main.c    Mon Jul 28 16:42:51 1997
  639. +++ armul-fixed/main.c    Mon Jul 28 16:29:57 1997
  640. @@ -28,12 +28,7 @@
  641.  void dagstandalone(void);
  642.  
  643.  int main(int argc, char *argv[]) {
  644. -  int i;
  645.  
  646.    dagstandalone();
  647.    return 1;
  648.  }
  649. -
  650. -
  651. -
  652. -
  653. Only in armul-arc/: main.c.orig
  654. Only in armul-arc/: main.o
  655. diff --unified --recursive armul-arc/parent.c armul-fixed/parent.c
  656. --- armul-arc/parent.c    Fri Dec  9 13:51:16 1994
  657. +++ armul-fixed/parent.c    Mon Jul 28 15:58:48 1997
  658. @@ -24,6 +24,8 @@
  659.  #include <stdio.h>
  660.  #include <sys/types.h>
  661.  #include <signal.h>
  662. +#include <unistd.h>
  663. +#include <sys/time.h>
  664.  
  665.  #include "armdefs.h"
  666.  #include "dbg_rdi.h"
  667. @@ -415,7 +417,7 @@
  668.            break;
  669.  
  670.          default:
  671. -          fprintf (stderr, "Unrecognized RDIInfo request %d\n",
  672. +          fprintf (stderr, "Unrecognized RDIInfo request %lu\n",
  673.                 messagetype);
  674.            goto panic_error;
  675.          }
  676.